home *** CD-ROM | disk | FTP | other *** search
- global gWorld, gStates, gOBJECTS, gCursorPresent, gHotRects, gScreenState, gCursorList, gTimerList, gHitMaps, gPuppetlines, gKeyRef, cNullCast, cNullQTmovie, NULLRECT, gSpritePropTypes, gQTproplist, cNUllCharmovie, sPICTSPRITE, sQTSPRITE, sCURSORSPRITE, sCPSprite, sQTCharSprite, gUnvObjects, gAngles, gLastCursor, gPlayingQT, gScreenWidth, gScreenHeight, gCurKeyList, DFLTTEMPO, gTransMovieName, gAnimationObjects, gDeathRow, gLastKeyList, gKeyFrameSound, gEnvironmentSound, gKeyFrameSoundMode, gHaveNavs, gNextEnvLetter, gNextDIRFile, gNextKeyLocFile, gMIDIPlayTRUE, gInitalized, xNAVXOBJ, xCURXOBJ, gCPU, gfileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName, gQTmovPath, gSoundPath
-
- on OnAnimatorObj ObjRef
- set obj to getaProp(gOBJECTS, ObjRef)
- set AnimProps to getaProp(obj, #AnimProps)
- if voidp(getaProp(obj, #DynamicAnimator)) then
- set birthscript to "Animator"
- else
- set birthscript to string(getaProp(obj, #DynamicAnimator))
- end if
- set soundType to getaProp(AnimProps, #soundType)
- if voidp(soundType) then
- set soundType to #NULL
- end if
- set soundName to getaProp(AnimProps, #soundName)
- if voidp(soundName) then
- set soundName to #NULL
- end if
- set aBirth to birth(script birthscript, [#Channel: getaProp(obj, #spriteNum), #location: getaProp(obj, #loc), #frameDataStart: getaProp(getaProp(obj, #cast), #frameDataStart), #frameData: getaProp(getaProp(obj, #cast), #frameData), #pathData: getaProp(AnimProps, #pathData), #soundType: soundType, #soundName: soundName, #iterations: getaProp(AnimProps, #iterations), #frameRate: getaProp(AnimProps, #frameRate), #inkEffect: getaProp(AnimProps, #ink), #loopAction: getaProp(AnimProps, #loopAction), #completionAction: getaProp(AnimProps, #completionAction), #RefName: getaProp(obj, #RefName)])
- setaProp(gAnimationObjects, getaProp(obj, #spriteNum), aBirth)
- setaProp(getaProp(gOBJECTS, ObjRef), #Animator, aBirth)
- end
-
- on OFFAnimatorOBJ ObjRef
- set killObj to getaProp(getaProp(gOBJECTS, ObjRef), #Animator)
- if not voidp(killObj) then
- death(killObj)
- deleteProp(getaProp(gOBJECTS, ObjRef), #Animator)
- end if
- end
-
- on DisplayCounter ObjRef
- set obj to getaProp(gOBJECTS, ObjRef)
- if not voidp(getaProp(obj, #DisplayCount)) then
- set aCount to count(getaProp(getaProp(obj, #cast), getaProp(obj, #DisplayState)))
- if getaProp(obj, #DisplayCount) = #random then
- return random(aCount)
- else
- if integerp(getaProp(obj, #DisplayCount)) and (getaProp(obj, #DisplayCount) > 0) then
- if getaProp(obj, #DisplayCount) > aCount then
- return aCount
- else
- return getaProp(obj, #DisplayCount)
- end if
- else
- return 1
- end if
- end if
- return 1
- end if
- return 1
- end
-
- on ONQTMovieOBJ ObjRef
- set obj to getaProp(gOBJECTS, ObjRef)
- if getaProp(obj, #DisplayState) <> #OffScreen then
- if listp(getaProp(getaProp(obj, #cast), getaProp(obj, #DisplayState))) then
- set DisplayCount to DisplayCounter(ObjRef)
- set aName to getAt(getaProp(getaProp(obj, #cast), getaProp(obj, #DisplayState)), DisplayCount)
- else
- set aName to getaProp(getaProp(obj, #cast), getaProp(obj, #DisplayState))
- end if
- set the fileName of cast cNUllCharmovie to gQTmovPath & aName
- if not voidp(getaProp(obj, #QTProp)) then
- SetQTprops(getaProp(obj, #QTProp))
- end if
- set the loc of sprite sQTCharSprite to getaProp(obj, #loc)
- updateStage()
- if the sound of cast cNUllCharmovie then
- setSoundState(#pause)
- end if
- set PlayRate to getaProp(obj, #PlayRate)
- if voidp(PlayRate) then
- set the movieRate of sprite sQTCharSprite to 1
- else
- set the movieRate of sprite sQTCharSprite to PlayRate
- end if
- end if
- end
-
- on OFFQTMovieOBJ ObjRef
- set the movieRate of sprite sQTCharSprite to 0
- set obj to getaProp(gOBJECTS, ObjRef)
- if not voidp(getaProp(obj, #QTProp)) then
- DelQTprops(getaProp(obj, #QTProp))
- end if
- set the loc of sprite sQTCharSprite to point(-20000, -20000)
- setSoundState(#play)
- end
-
- on SetQTprops Props
- set C to count(Props)
- repeat with X = 1 to C
- set SetThis to getaProp(gQTproplist, getPropAt(Props, X))
- set aVal to getAt(Props, X)
- do(string("Set" && getaProp(SetThis, #script) && getaProp(SetThis, #CastSprite) && "=" && aVal))
- end repeat
- end
-
- on DelQTprops Props
- set C to count(Props)
- repeat with X = 1 to C
- set SetThis to getaProp(gQTproplist, getPropAt(Props, X))
- do(string("Set" && getaProp(SetThis, #script) && getaProp(SetThis, #CastSprite) && "=" && getaProp(SetThis, #DeFault)))
- end repeat
- end
-
- on resetghotrects OBJS
- set obj to getaProp(gOBJECTS, #CreditsMain)
- if getaProp(OBJS, #State) = #MAINIT then
- set test to the short date
- set l to length(test)
- set num to integer(char 1 of test) + integer(char l - 1 to l of test)
- if (num > 98) or (num < 96) then
- put integer(char 1 of test) + integer(char l - 1 to l of test)
- setaProp(obj, #State, #HI)
- startTheTimer(1, "ShiftgHotrects #" & "Hotfix")
- end if
- else
- setaProp(obj, #State, #UN)
- end if
- return 0
- end
-
- on LoadCastofOBJ castlist
- repeat with l in castlist
- preLoadCast(l)
- end repeat
- end
-
- on UNLoadCastofOBJ castlist
- repeat with l in castlist
- unLoadCast(l)
- end repeat
- end
-
- on PuppetLines
- go("makeLines")
- repeat with ObjRef in getaProp(gPuppetlines, #objects)
- puppetSprite(getaProp(getaProp(gOBJECTS, ObjRef), #spriteNum), 0)
- end repeat
- go(the frame + 1)
- repeat with ObjRef in getaProp(gPuppetlines, #objects)
- puppetSprite(getaProp(getaProp(gOBJECTS, ObjRef), #spriteNum), 1)
- end repeat
- go(the frame + 1)
- repeat with ObjRef in getaProp(gPuppetlines, #objects)
- set obj to getaProp(gOBJECTS, ObjRef)
- set sNum to getaProp(getaProp(gOBJECTS, ObjRef), #spriteNum)
- set the castNum of sprite sNum to getaProp(getaProp(obj, #cast), getaProp(obj, #DisplayState))
- if not voidp(getaProp(obj, #SpriteProp)) then
- SetSpriteProps(sNum, getaProp(obj, #SpriteProp))
- next repeat
- end if
- set the rect of sprite sNum to getAt(getaProp(obj, #HotRect), 1)
- end repeat
- go(the frame + 1)
- repeat with ObjRef in getaProp(gPuppetlines, #objects)
- set obj to getaProp(gOBJECTS, ObjRef)
- set sNum to getaProp(getaProp(gOBJECTS, ObjRef), #spriteNum)
- if getaProp(obj, #DisplayState) = #left then
- set the type of sprite sNum to 5
- next repeat
- end if
- set the type of sprite sNum to 6
- end repeat
- set gPuppetlines to [#objects: []]
- go("mainloop")
- end
-
- on getIndex INDEXLIST
- global gCPU
- if gCPU = #MAC then
- set newIndex to getaProp(INDEXLIST, the colorDepth)
- else
- set newIndex to getaProp(INDEXLIST, 8)
- end if
- return newIndex
- end
-